<?php /* Model para interacciones comunes a la BD de toda la aplicacion */
 class Globals_m extends CI_Model{
    function __construct(){
      parent::__construct();
    }

/* Insertar nueva imagen */
    function insert_pic($upload_path,$data){
     foreach($data as $data){
        $data = array('pic_path' => $upload_path,
                      'pic_name_file'=> $data['raw_name'],
                      'pic_ext' => $data['file_ext'],
                      'pic_size'=> $data['file_size'],
                     );
                   }
     $this->db->insert('pictures',$data);
     return $id_pic = $this->db->insert_id();
    }


  
}    
   